
                当前位置：
                <a href="<?php echo site_url('admin/content/add'); ?>" class="layui-btn layui-btn-sm fr">添加内容</a>
                <span class="layui-breadcrumb" lay-separator="/">
                    <a href="<?php echo site_url('admin/content/index'); ?>">内容管理</a>
                    <a><cite>内容列表</cite></a>
                </span>

                <hr>

                <form class="layui-form layui-form-pane" action="" method="get">
                    <div class="layui-form-item">
                        <label class="layui-form-label">所属分类</label>
                        <div class="layui-input-inline" style="width: 180px;">
                            <select name="category_id" lay-filter="category_id">
                                <option value="0">--请选择--</option>
                                <?php
                                if (! empty($category)):
                                    $category_id = $this->input->get('category_id');
                                    foreach ($category as $key => $value):
                                ?>
                                <option value="<?php echo $value['id']; ?>"<?php echo $category_id == $value['id'] ? ' selected' : ''; ?>><?php echo str_repeat('&nbsp;', ($value['level'] - 1) * 4) , $value['name']; ?></option>
                                <?php
                                    endforeach;
                                endif;
                                ?>
                            </select>
                        </div>
                        <label class="layui-form-label">状态</label>
                        <div class="layui-input-inline" style="width: 120px;">
                            <select name="status" lay-filter="status">
                                <option value="0">--所有--</option>
                                <option value="1"<?php echo $this->input->get('status') == 1 ? ' selected' : ''; ?>>Off</option>
                                <option value="2"<?php echo $this->input->get('status') == 2 ? ' selected' : ''; ?>>On</option>
                            </select>
                        </div>
                        <label class="layui-form-label">关键词</label>
                        <div class="layui-input-inline" style="width: 300px;">
                            <input type="text" name="keywords" placeholder="请输入关键词" class="layui-input" value="<?php echo $this->input->get('keywords'); ?>">
                        </div>
                        <div class="layui-input-inline" style="width: 80px;">
                            <button class="layui-btn" lay-submit="">搜索</button>
                        </div>
                    </div>
                </form>

                <fieldset class="layui-elem-field layui-field-title">
                    <legend>信息列表</legend>
                </fieldset>

                <table class="layui-table" lay-size="">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>所属分类</th>
                            <th>标题</th>
                            <th>浏览次数</th>
                            <th>状态</th>
                            <th>排序</th>
                            <th>更新时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <?php if (! empty($lists)): ?>
                    <tbody>
                        <?php
                        $p = (int) $this->uri->segment(5, 0);
                        $area = config_item('area');
                        foreach ($lists as $key => $value):
                        ?>
                        <tr>
                            <td><?php echo $value['id']; ?></td>
                            <td><?php echo $value['cate_name']; ?></td>
                            <td><?php echo $value['title']; ?></td>
                            <td><?php echo $value['views']; ?></td>
                            <td><?php echo empty($value['status']) ? 'Off' : 'On'; ?></td>
                            <td><?php echo $value['sort']; ?></td>
                            <td><?php echo date('Y-m-d H:i', $value['update_time']); ?></td>
                            <td>
                                <div class="layui-btn-group">
                                <a title="编辑" href="<?php echo site_url('admin/content/edit/'. $value['id'] .'/'. $p); ?>" class="layui-icon layui-btn layui-btn-xs">&#xe642;</a>
                                <a title="删除" url="<?php echo site_url('admin/content/del/'. $value['id'] .'/'. $p); ?>" class="layui-icon layui-btn layui-btn-xs layui-btn-danger del">&#xe640;</a>
                                </div>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                    <?php endif; ?>
                </table>
                <div class="page"><?php echo $page; ?></div>
